/*
 * @Author: CQJ
 * @Date: 2022-08-25 20:00:27
 * @LastEditors: CQJ
 * @LastEditTime: 2022-09-09 00:05:06
 * @Description:
 */
import { storage } from '@/utils/storage'
import { reactive } from 'vue'

type Key = string
interface TagState {
  module: number | undefined
  tag_id: string | undefined
  // 关键词
  tag_keyword: string | undefined
  site_id: string | undefined
}

// 状态管理
export const tagState = reactive<TagState>({
  module: undefined,
  tag_id: undefined,
  tag_keyword: undefined,
  site_id: undefined
})
interface StatusState {
  formVisible: boolean
  batchVisible: boolean
  selectedRowKeys: Key[]
  isAdd: boolean
}
export const statusState = reactive<StatusState>({
  formVisible: false,
  batchVisible: false,
  selectedRowKeys: [],
  isAdd: false
})
export const resetState = () => {
  tagState.tag_keyword = undefined
  tagState.tag_id = undefined
  tagState.module = undefined
}
